package puf.m2.automaton;

import java.util.List;

/**
 * A word (or string) is a sequence of symbols in an alphabet.
 * A word can be a walk or a normal string.
 * @param <C>
 */
public interface Word<C> {

    public static final String EPSILON = "\u03B5";

    /**
     * Returns the symbol value at the specified index.
     * @param index
     * @return
     */
    C  symbolAt(int index);

    /**
     * Returns the length of this character sequence.
     * @return
     */
    int length();

    String toString();

    Word<C> invert();
    Word<C> concat(Word<C> word);
    Word<C> jointSuffix(Word<C> word);
    Word<C> jointPrefix(Word<C> word);
    List<C> symbols();
}